package com.ms.game.invitefriend.async;

import java.util.ArrayList;
import java.util.HashMap;

import com.ms.game.invitefriend.db.InviteFriendDAO;
import com.ms.game.invitefriend.message.SSimpleDownlineDataResponse;
import com.ms.service.error.ErrorCode;
import com.ms.service.module.datacenterlite.CentralAsyncCommand;
import com.xpec.c4.game.utility.GUID;
import com.xpec.c4.service.message.MessageAction;

public class GetSimpleDownlineListAsync extends CentralAsyncCommand{


	private static final long serialVersionUID = -8702900675483984152L;

	public GUID playerId;
	
	public GUID sessionId;
	public int messageType;
	@Override
	public void asyncExecute() throws Exception {
		SSimpleDownlineDataResponse response = new SSimpleDownlineDataResponse();
		ArrayList<HashMap<String,String>> usedData = InviteFriendDAO.getUsedInviteCodePlayers(playerId.toString());
		response.downlineData = usedData;
		response.errorCode = ErrorCode.SUCCESS;
		MessageAction.sendMessage(sessionId, messageType, response);
	}

	@Override
	public void callBackExecute(Object... userData) throws Exception {
		// TODO Auto-generated method stub
		
	}

}
